package com.recommender.dao;

import com.recommender.entity.Movies;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface MoviesDao {
    
    Movies queryById(int id);

    List<Movies> queryAllByLimit(@Param("offset") int offset, @Param("limit") int limit);
    
    List<Movies> queryAll(Movies movies);

    int insert(Movies movies);

    int insertBatch(@Param("entities") List<Movies> entities);

    int insertOrUpdateBatch(@Param("entities") List<Movies> entities);

    int update(Movies movies);

    int deleteById(int id);

    int getCount();
}

